package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;
import org.bson.types.ObjectId;

import java.util.List;
import java.util.Map;

public interface MovementApi {

    //发布动态
    String publish(Movement movement);

    //根据用户id，查询此用户发布的动态数据列表
    PageResult findByUserId(Long userId,Integer state,Integer page, Integer pagesize);

    List<Movement> findFriendMovements(Long userId, Integer page, Integer pagesize);

    List<Movement> randomMovements(Integer pagesize);

    List<Movement> findByPids(List<Long> pids);

    Movement findById(String movementId);

    void update(String movementId, Integer state);

    /**
     * 动态审核
     * @param movementId
     * @param state
     */
    void passMovements(String movementId, Integer state);

    /**
     * 动态置顶/取消置顶
     * @param id
     * @return
     */
    Integer top(String id,int args);

}
